
package com.fire.eyes.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.fire.eyes.dao.UserTokenMapper;
import com.fire.eyes.model.UserTokenModel;
import com.fire.eyes.service.IUserTokenService;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.plugins.Page;

import java.util.List;
import java.util.Map;

/**
 * 用户token(缓存）Service
 *
 * @author Matthew
 * @Date 2019-01-17 20:50
 */
@Service
public class UserTokenServiceImpl extends ServiceImpl<UserTokenMapper, UserTokenModel> implements IUserTokenService{

    private static final Logger LOGGER = LoggerFactory.getLogger(UserTokenServiceImpl.class);

    @Autowired
    private UserTokenMapper userTokenMapper;

    @Override
    public UserTokenModel selectOne(UserTokenModel entity){
        return userTokenMapper.selectOne(entity);
    }

    @Override
    public List<UserTokenModel>selectList(UserTokenModel model){
        return userTokenMapper.selectListByModel(model);
    }

    @Override
    public Page<UserTokenModel> selectPage(int currentPage, int pageSize, Wrapper<UserTokenModel> wrapper){
        return selectPage(new Page<UserTokenModel>(currentPage,pageSize), wrapper);
    }

    @Override
    public Page<Map<String, Object>> selectMapsPage(int currentPage, int pageSize, Wrapper<UserTokenModel> wrapper){
        return selectMapsPage(new Page<UserTokenModel>(currentPage,pageSize), wrapper);
    }

}
